cmake_minimum_required(VERSION 3.16)
project(auto VERSION 1.0 LANGUAGES C CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Set up AUTOMOC and some sensible defaults for runtime execution
# When using Qt 6.3, you can replace the code block below with
# qt_standard_project_setup()
set(CMAKE_AUTOMOC ON)
include(GNUInstallDirs)

find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS 3DAnimation 3DCore 3DExtras 3DInput 3DQuick 3DQuickExtras 3DQuickRender 3DRender Gui Qml Quick Test)


add_subdirectory(coretest)
add_subdirectory(core)
add_subdirectory(cmake)
add_subdirectory(global)
if(QT_FEATURE_qt3d_render)
    add_subdirectory(render)
    add_subdirectory(geometryloaders)
endif()
if(QT_FEATURE_qt3d_input)
    add_subdirectory(input)
endif()
if(QT_FEATURE_qt3d_animation)
    add_subdirectory(animation)
endif()
if(QT_FEATURE_qt3d_extras)
    add_subdirectory(extras)
endif()
if(QT_FEATURE_qt3d_input AND QT_FEATURE_qt3d_render)
    add_subdirectory(quick3d)
endif()
